<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<script src="../vue.js"></script>
<style>
  button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
  }
</style>

<body>
  <div id="app">
    <!-- <transiton name="fade" mode="out-in"> -->
    <!-- <transiton name="fade" mode="in-out"> -->
    <transiton name="fade">
      <button :key="ifOff" @click="ifOff= !ifOff">{{ifOff ? "OFF" : "ON"}}</button>
    </transiton>
  </div>

  <script>
    var vm = new Vue({
      el: "#app",
      data: {
        ifOff: false
      }
    })
  </script>
</body>

</html>